<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>SanShui API 使用教程 | SanShui的个人博客</title><meta name="author" content="SanShui"><meta name="copyright" content="SanShui"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="ffffff"><meta name="description" content="SanShui API 使用教程">
<meta property="og:type" content="article">
<meta property="og:title" content="SanShui API 使用教程">
<meta property="og:url" content="https://huaiyuechusan.github.io/archives/6ca065c5.html">
<meta property="og:site_name" content="SanShui的个人博客">
<meta property="og:description" content="SanShui API 使用教程">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://wallpaper.csun.site/?abc">
<meta property="article:published_time" content="2025-01-09T00:06:00.000Z">
<meta property="article:modified_time" content="2025-03-13T13:21:12.311Z">
<meta property="article:author" content="SanShui">
<meta property="article:tag" content="AI大模型">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://wallpaper.csun.site/?abc"><link rel="shortcut icon" href="/./img/config_img/%E9%98%B3%E5%85%89%E5%B0%8F%E7%8C%AB.jpg"><link rel="canonical" href="https://huaiyuechusan.github.io/archives/6ca065c5"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: true,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'SanShui API 使用教程',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2025-03-13 21:21:12'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', 'ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><script src="https://npm.elemecdn.com/echarts@4.9.0/dist/echarts.min.js"></script><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-double-row-display@1.00/cardlistpost.min.css"/>
<style>#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap > .tags:before {content:"\A";
  white-space: pre;}#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap > .tags > .article-meta__separator{display:none}</style>
<link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-categories-card@1.0.0/lib/categorybar.css"><link rel="stylesheet" href="/./css/runtime.css" media="print" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.2"><link rel="alternate" href="/atom.xml" title="SanShui的个人博客" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>const preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> { preloader.endLoading() })

if (true) {
  document.addEventListener('pjax:send', () => { preloader.initLoading() })
  document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}</script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/./img/config_img/%E9%98%B3%E5%85%89%E5%B0%8F%E7%8C%AB.jpg" onerror="onerror=null;src='./img/config_img/蓝天.jpg'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">25</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">16</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/comments/"><i class="fa-fw fas fa-envelope-open"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('http://wallpaper.csun.site/?abc')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">SanShui的个人博客</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/comments/"><i class="fa-fw fas fa-envelope-open"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">SanShui API 使用教程</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2025-01-09T00:06:00.000Z" title="发表于 2025-01-09 08:06:00">2025-01-09</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-03-13T13:21:12.311Z" title="更新于 2025-03-13 21:21:12">2025-03-13</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/AI%E5%A4%A7%E6%A8%A1%E5%9E%8B/">AI大模型</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">2.6k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>9分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="SanShui API 使用教程"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><meta name="referrer" content="no-referrer" />

<h1 id="SanShui-API-使用教程"><a href="#SanShui-API-使用教程" class="headerlink" title="SanShui API 使用教程"></a>SanShui API 使用教程</h1><h2 id="SanShui-介绍"><a href="#SanShui-介绍" class="headerlink" title="SanShui 介绍"></a>SanShui 介绍</h2><p>SanShui API 是一个低价的 gpt 中转 API，支持 gpt3.5 gpt4 Claude3 DeepSeek 全系列模型。</p>
<p>价格优惠，仅需 <strong>1.5 元</strong>即可购买 1 美刀额度，只要官方价格的 <strong>五分之一</strong></p>
<p>官方同等计费方式，不限时间，按量计费，明细可查，每一笔消耗都公开透明。</p>
<p>官网地址：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/">SanShui API</a></p>
<p>支持模型</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443591.png" alt="image-20250209140940808"></p>
<h2 id="如何充值"><a href="#如何充值" class="headerlink" title="如何充值"></a>如何充值</h2><p>支持支付宝付款，前往 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/topup">充值页面</a> 输入金额，点击支付宝付款方式，付款成功即可完成充值。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502102054681.png" alt="image-20250210205146231"></p>
<p>售后问题请进售后QQ群：<strong>1029767983</strong></p>
<h2 id="计费规则"><a href="#计费规则" class="headerlink" title="计费规则"></a>计费规则</h2><p><strong>总的来讲，就是我们后台用美元计费，与 open AI 的模型价格保持一致，折扣体现在充值的时候。目前是1 美元只需要 1.5 人民币，详细以<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/topup">充值</a>页面价格为准。</strong></p>
<h3 id="请求明细查看"><a href="#请求明细查看" class="headerlink" title="请求明细查看"></a>请求明细查看</h3><p>在本网站的<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/log">日志</a>界面可以查看到每一次调用的明细</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443592.png" alt="image-20250209141459807"></p>
<p>提示是用户使用时输入到模型的所有信息消耗的 token 数，补全是模型输出的所有信息消耗的 token 数 ，提示和补全都是要扣费的。</p>
<p>所有模型的计费方式，就是基于消耗的多少 token 来计算价格。 大部分情况下，你都可以使用 1 汉字 = 2 token 来近似估算中文聊天的中文所需 token 数。但这并不是绝对的，因为不同的字实际 token 不一样，官方只按 token 计算。</p>
<h3 id="关于倍率"><a href="#关于倍率" class="headerlink" title="关于倍率"></a>关于倍率</h3><p>倍率是用来计算模型价格的，从而计算额度消耗</p>
<p>额度消耗 = 分组倍率 <em> 基准价格 </em> 模型倍率 <em> （提示 token 数 + 补全 token 数 </em> 补全倍率）</p>
<p>基准价格是 1 美元 50w token</p>
<p>正常来说用户可以不用管倍率问题，因为在<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/pricing">模型价格</a>页面已经详细列出了每个模型提示和补全的价格</p>
<p>额度消耗 = 提示 token 数 <em> 提示价格 + 补全 token 数 </em> 补全价格</p>
<p>将鼠标移到日志界面详情上，也可以查看计算过程</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443593.png" alt="image-20250209141611942"></p>
<h2 id="如何使用"><a href="#如何使用" class="headerlink" title="如何使用"></a>如何使用</h2><p>使用与官方类似，首先需要获取 api key，即令牌，前往<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/token">令牌</a>页面，点击添加令牌。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443594.png" alt="image-20250209141714103"></p>
<p>设置好令牌名称、过期时间、令牌额度，点击提交即可。</p>
<p>⚠️注意：令牌额度决定了你这个令牌能使用多少额度，但会受到你的余额限制。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443595.png" alt="image-20250209141902855"></p>
<p>创建令牌后，点击复制按钮，即可复制令牌的值，也就是 api key，令牌形如 sk-xxxxxx。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443596.png" alt="image-20250209141939595"></p>
<p>在需要使用 API 的平台，将 <code>BASE_URL</code> 改为中转 API 调用地址 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/">https://api.aigpt4.top/</a> ，不同的客户端可能需要填写不同的 BASE_URL，请尝试如下地址：</p>
<ul>
<li><a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/">https://api.aigpt4.top/</a>            (最常用的openai格式)</li>
<li><a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1/">https://api.aigpt4.top/v1/</a></li>
<li><a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1/chat/completions">https://api.aigpt4.top/v1/chat/completions</a></li>
</ul>
<h3 id="在CherryStudio中使用"><a href="#在CherryStudio中使用" class="headerlink" title="在CherryStudio中使用"></a>在CherryStudio中使用</h3><p>在官网下载客户端 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://docs.cherry-ai.com/cherrystudio/download">客户端下载 | CherryStudio</a></p>
<p>第一步打开CherryStudio的设置界面，选择openai。输入我们网页中令牌的key，api地址填写：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top">https://api.aigpt4.top</a></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906968.png" alt="image-20250210185417245"></p>
<p>第二步点击添加自定义模型，模型名称可以在<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/pricing中找到对应需要的模型名字">https://api.aigpt4.top/pricing中找到对应需要的模型名字</a></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906970.png" alt="image-20250210185603824"></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906971.png" alt="image-20250210185706892"></p>
<p>第三步，点击对话上方选择模型，选择我们刚才添加的，然后就可以对话了</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906972.png" alt="image-20250210185810781"></p>
<h3 id="在-Chatbox-中使用"><a href="#在-Chatbox-中使用" class="headerlink" title="在 Chatbox 中使用"></a>在 Chatbox 中使用</h3><p>访问 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://web.chatboxai.app/（国内稳定访问）或点击侧边栏">https://web.chatboxai.app/（国内稳定访问）或点击侧边栏</a> 聊天</p>
<p>进入页面后在设置页面勾选自定义接口，模型服务商选择 openai，并将接口地址更改为 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/">https://api.aigpt4.top/</a>, API Key 填写上述创建的 API Key。</p>
<p>⚠️注意：本站所有模型都使用 openai 标准接口，即使是使用 claude3、deepseek 系列模型，模型服务商也要选择 openai</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443597.png" alt="image-20250209142234746"></p>
<p>如果有需要使用的模型，但是 chatbox 提供的下拉列表里面没有的话，请自定义模型，如 gpt-4-turbo-2024-04-09,gpt-4o,claude-3-sonnet-20240229,claude-3-opus-20240229,claude-3-haiku-20240307。</p>
<p>模型名称可以在<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/pricing中找到对应需要的模型名字">https://api.aigpt4.top/pricing中找到对应需要的模型名字</a></p>
<p>:warning: deepseek模型名称为：deepseek-reasoner、deepseek-chat<br>        :warning: deepseek-reasoner对应DeepSeek-R1模型，deepseek-chat对应DeepSeek-V3模型</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443598.png" alt="image-20250209142322000"></p>
<p>然后点击新的聊天之间使用即可，模型可点击输入框上方切换。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443599.png" alt="image-20250209142434965"></p>
<h3 id="在AnythingLLM中使用"><a href="#在AnythingLLM中使用" class="headerlink" title="在AnythingLLM中使用"></a>在AnythingLLM中使用</h3><p>打开官网<a target="_blank" rel="noopener external nofollow noreferrer" href="https://anythingllm.com/">AnythingLLM | The all-in-one AI application for everyone</a>下载安装AnythingLLM</p>
<p>安装完成后打开设置</p>
<p>左侧选择LLM首选项，选择generic openai。填写base_url ：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top">https://api.aigpt4.top</a></p>
<p>api key在我们网站的令牌中申请，复制到这里</p>
<p>然后填写模型名称，模型名称可以在<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/pricing中找到对应需要的模型名字，根据需求填入，即可使用。">https://api.aigpt4.top/pricing中找到对应需要的模型名字，根据需求填入，即可使用。</a></p>
<p>上下文token和最大输出token可以根据自己需求修改。</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502121643128.png" alt="image-20250212114109064"></p>
<h3 id="在Cline中使用"><a href="#在Cline中使用" class="headerlink" title="在Cline中使用"></a>在Cline中使用</h3><p>打开vscode，点击插件搜索Cline</p>
<p>打开Cline的设置，选择按照下图所示填写，key填写自己在令牌中复制的</p>
<p>base_url填写为：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1">https://api.aigpt4.top/v1</a></p>
<p>模型名称：deepseek-reasoner对应DeepSeek-R1模型，deepseek-chat对应DeepSeek-V3模型</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906973.png" alt="image-20250210185019281"></p>
<h3 id="在CodeGPT中使用"><a href="#在CodeGPT中使用" class="headerlink" title="在CodeGPT中使用"></a>在CodeGPT中使用</h3><p>打开Pycharm，点击插件搜索CodeGPT</p>
<p>打开CodeGPT的设置，选择customer openai 选择按照下图所示填写，key填写自己在令牌中复制的</p>
<p>url填写为：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1/chat/completions">https://api.aigpt4.top/v1/chat/completions</a></p>
<p>选择body，填写要调用的模型名称。根据需求填写max_token</p>
<p>模型名称：deepseek-reasoner对应DeepSeek-R1模型，deepseek-chat对应DeepSeek-V3模型</p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502112105978.png" alt="image-20250211175913188"></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502112105980.png" alt="image-20250211175918913"></p>
<h3 id="在Cursor中使用"><a href="#在Cursor中使用" class="headerlink" title="在Cursor中使用"></a>在Cursor中使用</h3><p>打开Cursor设置，在openai key下方输入我们网站令牌中的key，base_url为<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1">https://api.aigpt4.top/v1</a></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906974.png" alt="image-20250210190245028"></p>
<p>添加模型，输入模型名称。模型名称可以在<a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/pricing中找到对应需要的模型名字，填入，即可使用。">https://api.aigpt4.top/pricing中找到对应需要的模型名字，填入，即可使用。</a></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502101906975.png" alt="image-20250210190417289"></p>
<h3 id="在沉浸式翻译中使用"><a href="#在沉浸式翻译中使用" class="headerlink" title="在沉浸式翻译中使用"></a>在沉浸式翻译中使用</h3><p>沉浸式翻译 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://immersivetranslate.com/">https://immersivetranslate.com/</a></p>
<p>一款免费的，好用的，没有废话的，革命性的，饱受赞誉的，AI 驱动的双语网页翻译扩展，你可以完全免费地使用它来实时翻译外语网页，PDF 文档，ePub 电子书，字幕文件等。</p>
<p>在基本设置中翻译服务选择 openai，勾选自定义 API Key，API Key 填写创建的令牌，模型建议选择 gpt-3.5 系列，自定义 API 地址填写 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://api.aigpt4.top/v1/chat/completions">https://api.aigpt4.top/v1/chat/completions</a></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443600.png" alt="image-20250209142632916"></p>
<p><img src="https://gitee.com/huaiyuechusan/picture/raw/master/Typora/202502091443601.png" alt="image-20250209142649269"></p>
<h3 id="在-LangChain-中使用"><a href="#在-LangChain-中使用" class="headerlink" title="在 LangChain 中使用"></a>在 LangChain 中使用</h3><p>最简单的就是：直接设置环境变量代码如下</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">API_SECRET_KEY = &quot;sk-pvMtoVO******66249058b93C766F2D70167&quot; # 你创建的令牌</span><br><span class="line">BASE_URL = &quot;https://api.aigpt4.top/v1&quot;; </span><br><span class="line"></span><br><span class="line">os.environ[&quot;OPENAI_API_KEY&quot;] = API_SECRET_KEY</span><br><span class="line">os.environ[&quot;OPENAI_BASE_URL&quot;] = BASE_URL</span><br></pre></td></tr></table></figure>
<p>注意：openai_api_base 的末尾要加上 /v1，</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">llm = ChatOpenAI(</span><br><span class="line">    openai_api_base=<span class="string">&quot;https://api.aigpt4.top/v1&quot;</span>, <span class="comment"># 注意，末尾要加 /v1</span></span><br><span class="line">    openai_api_key=<span class="string">&quot;sk-3133f******fee269b71d&quot;</span>,</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line">res = llm.predict(<span class="string">&quot;hello&quot;</span>)</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(res)</span><br></pre></td></tr></table></figure>
<p>示例代码，使用 LLM 进行预测</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">import</span> time</span><br><span class="line"><span class="keyword">import</span> json</span><br><span class="line"><span class="keyword">import</span> time</span><br><span class="line"></span><br><span class="line"><span class="keyword">from</span> langchain.llms <span class="keyword">import</span> OpenAI</span><br><span class="line"></span><br><span class="line">API_SECRET_KEY = <span class="string">&quot;创建的令牌&quot;</span>;</span><br><span class="line">BASE_URL = <span class="string">&quot;https://api.aigpt4.top/v1&quot;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">text</span>():</span><br><span class="line">    llm = OpenAI(temperature=<span class="number">0.9</span>)</span><br><span class="line">    text = <span class="string">&quot;What would be a good company name for a company that makes colorful socks?&quot;</span></span><br><span class="line">    <span class="built_in">print</span>(llm(text))</span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">&#x27;__main__&#x27;</span>:</span><br><span class="line">    text();</span><br></pre></td></tr></table></figure>
<h3 id="在官方-openai-库中使用"><a href="#在官方-openai-库中使用" class="headerlink" title="在官方 openai 库中使用"></a>在官方 openai 库中使用</h3><p>其他的方式和官方是一样的，只是改一个 URL 和 key 用我们的；具体 API 调用方法请查看官方文档即可。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">from openai import OpenAI</span><br><span class="line"></span><br><span class="line">client = OpenAI(</span><br><span class="line">    # 将这里换成你创建的令牌</span><br><span class="line">    api_key=&quot;sk-xxx&quot;,</span><br><span class="line">    # 这里将官方的接口访问地址，替换成我们 api的接口地址</span><br><span class="line">    base_url=&quot;https://api.aigpt4.top/v1&quot;</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line">chat_completion = client.chat.completions.create(</span><br><span class="line">    messages=[</span><br><span class="line">        &#123;</span><br><span class="line">            &quot;role&quot;: &quot;user&quot;,</span><br><span class="line">            &quot;content&quot;: &quot;Say this is a test&quot;,</span><br><span class="line">        &#125;</span><br><span class="line">    ],</span><br><span class="line">    model=&quot;gpt-3.5-turbo&quot;,</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line">print(chat_completion)</span><br></pre></td></tr></table></figure>
<h2 id="常见问题"><a href="#常见问题" class="headerlink" title="常见问题"></a>常见问题</h2><h3 id="为什么-gpt-4-额度消耗这么快"><a href="#为什么-gpt-4-额度消耗这么快" class="headerlink" title="为什么 gpt-4 额度消耗这么快"></a>为什么 gpt-4 额度消耗这么快</h3><p>gpt-4 的消耗速度是 gpt-3.5-turbo 的 20 到 40 倍，假设购买了 9w token，我们用 15 倍作为平均倍率，也就是 90000 / 15 = 6000 字左右，加上每次要附带上历史消息，能发的消息数将会进一步减半，在最极限的情况下，一条消息就能把 9w token 消耗完。</p>
<h3 id="为什么-GPT4-不知道它自己是谁？"><a href="#为什么-GPT4-不知道它自己是谁？" class="headerlink" title="为什么 GPT4 不知道它自己是谁？"></a>为什么 GPT4 不知道它自己是谁？</h3><p>直接问 GPT4：” 你是谁？““你是什么模型？” 诸如此类问题，一般情况下 GPT4 的 API 也会回答自己是 GPT3，估计是官方预置的原因。GPT4 和 3.5 用的都是 2021 年之前的数据，那时候还没有 GPT4。<br>官网和某些套壳不回答是 GPT3，是因为他们提前预设了提示词，让 GPT 认为自己是别的模型了，这个可以通过问答所消耗的总 token 看出来，预设提示词是会消耗 token 的。<br>如果说你对比官网和 API 的回答，发现有所不一，那也很正常。一是因为，GPT4 对同一个问题的每次回答都是不同的；二是，官网对 GPT4 的参数进行了一定的优化。</p>
<h3 id="为什么-GPT4-会给出这么弱智的回答，我还是觉得你们是假的-GPT4？"><a href="#为什么-GPT4-会给出这么弱智的回答，我还是觉得你们是假的-GPT4？" class="headerlink" title="为什么 GPT4 会给出这么弱智的回答，我还是觉得你们是假的 GPT4？"></a>为什么 GPT4 会给出这么弱智的回答，我还是觉得你们是假的 GPT4？</h3><p>GPT4 也不是万能的，训练参数并不比 GPT3 大多少，不用因为营销号的宣传神话 GPT4。而且由于中文语料在训练中的占比很小，在回答中文问题时，不排除在某些问题上表现不佳，同样的问题用英文问可能结果完全不一样，您可以试着用英文提问试试。<br>GPT4 强在推理能力，从目前大家的使用体验中来看，写代码方面会比 gpt3.5 强很多，但仍然会给出胡编的答案。</p>
<h3 id="如何检验-GPT3-5-还是-GPT4？"><a href="#如何检验-GPT3-5-还是-GPT4？" class="headerlink" title="如何检验 GPT3.5 还是 GPT4？"></a>如何检验 GPT3.5 还是 GPT4？</h3><p>我们提供了一个简单的方法来验证您使用的是 GPT3.5 还是 GPT4。以下是一些测试问题及 其不同模型的预期回答，您可以使用这些问题来测试。 测试问题：</p>
<ul>
<li>昨天的当天的明天是哪天？GPT-3.5 应答 “昨天”，而 GPT-4 应答 “今天”。</li>
<li>树上有 9 只鸟，猎人射杀了一只，还剩下多少只？GPT-3.5 可能说 “8 只”，GPT-4 会告诉你 “0 只，其他的鸟都飞走了”。</li>
<li>为什么周树人要打鲁迅？GPT-3.5 可能给出一个编造的答案，而 GPT-4 会指出 “鲁迅” 和” 周树人 “是同一个人。</li>
</ul>
<h3 id="为什么后台创建的令牌没有显示已用额度"><a href="#为什么后台创建的令牌没有显示已用额度" class="headerlink" title="为什么后台创建的令牌没有显示已用额度"></a>为什么后台创建的令牌没有显示已用额度</h3><p>当设置成无限额度后，不会更新已用额度，修改无限额度为有限额度即可</p>
<h3 id="无法登录"><a href="#无法登录" class="headerlink" title="无法登录"></a>无法登录</h3><p>请确保用户名填写正确，不要填写邮箱地址，是填写你注册时候的用户名，如遇到登录问题无法自行解决，请联系客服（vx：sanshuibiancheng），第一时间为您处理</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://huaiyuechusan.github.io">SanShui</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://huaiyuechusan.github.io/archives/6ca065c5.html">https://huaiyuechusan.github.io/archives/6ca065c5.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://huaiyuechusan.github.io" target="_blank">SanShui的个人博客</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/AI%E5%A4%A7%E6%A8%A1%E5%9E%8B/">AI大模型</a></div><div class="post_share"><div class="social-share" data-image="http://wallpaper.csun.site/?abc" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" src="/img/wechat.jpg" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" src="/img/alipay.jpg" alt="alipay"/></a><div class="post-qr-code-desc">alipay</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-full"><a href="/archives/f049facd.html"><img class="prev-cover" src="http://wallpaper.csun.site/?1" onerror="onerror=null;src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">读论文框架</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="lv-container" data-id="city" data-uid="MTAyMC81OTEzMS8zNTU5Mw=="></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/./img/config_img/%E9%98%B3%E5%85%89%E5%B0%8F%E7%8C%AB.jpg" onerror="this.onerror=null;this.src='/./img/config_img/%E8%93%9D%E5%A4%A9.jpg'" alt="avatar"/></div><div class="author-info__name">SanShui</div><div class="author-info__description">今天不学习，明天变垃圾</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">25</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">16</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><a id="card-info-btn" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/huaiyuechusan"><i class="fa-sharp fa-solid fa-plane"></i><span>欢迎关注我的Github</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/huaiyuechusan" rel="external nofollow noreferrer" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="https://huaiyuechusan.github.io/atom.xml" target="_blank" title=""><i class="fas fa-rss"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">欢迎来到SanShui的博客</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content is-expand"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#SanShui-API-%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B"><span class="toc-text">SanShui API 使用教程</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#SanShui-%E4%BB%8B%E7%BB%8D"><span class="toc-text">SanShui 介绍</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E5%85%85%E5%80%BC"><span class="toc-text">如何充值</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AE%A1%E8%B4%B9%E8%A7%84%E5%88%99"><span class="toc-text">计费规则</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%AF%B7%E6%B1%82%E6%98%8E%E7%BB%86%E6%9F%A5%E7%9C%8B"><span class="toc-text">请求明细查看</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%85%B3%E4%BA%8E%E5%80%8D%E7%8E%87"><span class="toc-text">关于倍率</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8"><span class="toc-text">如何使用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8CherryStudio%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在CherryStudio中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8-Chatbox-%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在 Chatbox 中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8AnythingLLM%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在AnythingLLM中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8Cline%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在Cline中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8CodeGPT%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在CodeGPT中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8Cursor%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在Cursor中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8%E6%B2%89%E6%B5%B8%E5%BC%8F%E7%BF%BB%E8%AF%91%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在沉浸式翻译中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8-LangChain-%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在 LangChain 中使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8%E5%AE%98%E6%96%B9-openai-%E5%BA%93%E4%B8%AD%E4%BD%BF%E7%94%A8"><span class="toc-text">在官方 openai 库中使用</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98"><span class="toc-text">常见问题</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88-gpt-4-%E9%A2%9D%E5%BA%A6%E6%B6%88%E8%80%97%E8%BF%99%E4%B9%88%E5%BF%AB"><span class="toc-text">为什么 gpt-4 额度消耗这么快</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88-GPT4-%E4%B8%8D%E7%9F%A5%E9%81%93%E5%AE%83%E8%87%AA%E5%B7%B1%E6%98%AF%E8%B0%81%EF%BC%9F"><span class="toc-text">为什么 GPT4 不知道它自己是谁？</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88-GPT4-%E4%BC%9A%E7%BB%99%E5%87%BA%E8%BF%99%E4%B9%88%E5%BC%B1%E6%99%BA%E7%9A%84%E5%9B%9E%E7%AD%94%EF%BC%8C%E6%88%91%E8%BF%98%E6%98%AF%E8%A7%89%E5%BE%97%E4%BD%A0%E4%BB%AC%E6%98%AF%E5%81%87%E7%9A%84-GPT4%EF%BC%9F"><span class="toc-text">为什么 GPT4 会给出这么弱智的回答，我还是觉得你们是假的 GPT4？</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E6%A3%80%E9%AA%8C-GPT3-5-%E8%BF%98%E6%98%AF-GPT4%EF%BC%9F"><span class="toc-text">如何检验 GPT3.5 还是 GPT4？</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%90%8E%E5%8F%B0%E5%88%9B%E5%BB%BA%E7%9A%84%E4%BB%A4%E7%89%8C%E6%B2%A1%E6%9C%89%E6%98%BE%E7%A4%BA%E5%B7%B2%E7%94%A8%E9%A2%9D%E5%BA%A6"><span class="toc-text">为什么后台创建的令牌没有显示已用额度</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%97%A0%E6%B3%95%E7%99%BB%E5%BD%95"><span class="toc-text">无法登录</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/archives/6ca065c5.html" title="SanShui API 使用教程"><img src="http://wallpaper.csun.site/?abc" onerror="this.onerror=null;this.src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="SanShui API 使用教程"/></a><div class="content"><a class="title" href="/archives/6ca065c5.html" title="SanShui API 使用教程">SanShui API 使用教程</a><time datetime="2025-03-13T13:21:12.311Z" title="更新于 2025-03-13 21:21:12">2025-03-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/archives/b5700173.html" title="微信小程序定时订阅消息问题"><img src="http://wallpaper.csun.site/?25" onerror="this.onerror=null;this.src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="微信小程序定时订阅消息问题"/></a><div class="content"><a class="title" href="/archives/b5700173.html" title="微信小程序定时订阅消息问题">微信小程序定时订阅消息问题</a><time datetime="2024-10-17T12:04:53.379Z" title="更新于 2024-10-17 20:04:53">2024-10-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/archives/638889b7.html" title="深度学习回归任务训练代码模版"><img src="http://wallpaper.csun.site/?24" onerror="this.onerror=null;this.src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="深度学习回归任务训练代码模版"/></a><div class="content"><a class="title" href="/archives/638889b7.html" title="深度学习回归任务训练代码模版">深度学习回归任务训练代码模版</a><time datetime="2024-10-17T12:04:09.066Z" title="更新于 2024-10-17 20:04:09">2024-10-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/archives/7cb9f0a8.html" title="通过nginx访问tomcat中SpringMVC应用"><img src="http://wallpaper.csun.site/?23" onerror="this.onerror=null;this.src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="通过nginx访问tomcat中SpringMVC应用"/></a><div class="content"><a class="title" href="/archives/7cb9f0a8.html" title="通过nginx访问tomcat中SpringMVC应用">通过nginx访问tomcat中SpringMVC应用</a><time datetime="2024-10-17T12:02:23.321Z" title="更新于 2024-10-17 20:02:23">2024-10-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/archives/d4b1abad.html" title="下载M3U8格式加密视频"><img src="http://wallpaper.csun.site/?22" onerror="this.onerror=null;this.src='/./img/config_img/%E5%A4%9C%E6%99%9A.jpg'" alt="下载M3U8格式加密视频"/></a><div class="content"><a class="title" href="/archives/d4b1abad.html" title="下载M3U8格式加密视频">下载M3U8格式加密视频</a><time datetime="2024-10-17T12:02:02.720Z" title="更新于 2024-10-17 20:02:02">2024-10-17</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('http://wallpaper.csun.site/?abc')"><div id="footer-wrap"><div class="footer_custom_text">更多内容查看<a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/huaiyuechusan/">我的GitHub</a> ！</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button><button id="go-down" type="button" title="直达底部" onclick="btf.scrollToDest(document.body.scrollHeight, 500)"><i class="fas fa-arrow-down"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>if (!window.MathJax) {
  window.MathJax = {
    tex: {
      inlineMath: [ ['$','$'], ["\\(","\\)"]],
      tags: 'ams'
    },
    chtml: {
      scale: 1.1
    },
    options: {
      renderActions: {
        findScript: [10, doc => {
          for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
            const display = !!node.type.match(/; *mode=display/)
            const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display)
            const text = document.createTextNode('')
            node.parentNode.replaceChild(text, node)
            math.start = {node: text, delim: '', n: 0}
            math.end = {node: text, delim: '', n: 0}
            doc.math.push(math)
          }
        }, ''],
        insertScript: [200, () => {
          document.querySelectorAll('mjx-container').forEach(node => {
            if (node.hasAttribute('display')) {
              btf.wrap(node, 'div', { class: 'mathjax-overflow' })
            } else {
              btf.wrap(node, 'span', { class: 'mathjax-overflow' })
            }
          });
        }, '', false]
      }
    }
  }
  
  const script = document.createElement('script')
  script.src = 'https://cdn.jsdelivr.net/npm/mathjax/es5/tex-mml-chtml.min.js'
  script.id = 'MathJax-script'
  script.async = true
  document.head.appendChild(script)
} else {
  MathJax.startup.document.state(0)
  MathJax.texReset()
  MathJax.typeset()
}</script><script>function loadLivere () {
  if (typeof LivereTower === 'object') {
    window.LivereTower.init()
  }
  else {
    (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
    })(document, 'script');
  }
}

if ('Livere' === 'Livere' || !true) {
  if (true) btf.loadComment(document.getElementById('lv-container'), loadLivere)
  else loadLivere()
}
else {
  function loadOtherComment () {
    loadLivere()
  }
}</script></div><div class="aplayer no-destroy" data-id="875151895" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true" data-volume="0.5"> </div><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = false;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-show-text.min.js" data-mobile="false" data-text="Nice,To,Meet,YOU" data-fontsize="15px" data-random="false" async="async"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["meta[property=\"og:image\"]","meta[property=\"og:title\"]","meta[property=\"og:url\"]","head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script data-pjax>
    function butterfly_categories_card_injector_config(){
      var parent_div_git = document.getElementById('recent-posts');
      var item_html = '<style>li.categoryBar-list-item{width:32.3%;}.categoryBar-list{max-height: 380px;overflow:auto;}.categoryBar-list::-webkit-scrollbar{width:0!important}@media screen and (max-width: 650px){.categoryBar-list{max-height: 320px;}}</style><div class="recent-post-item" style="height:auto;width:100%;padding:0px;"><div id="categoryBar"><ul class="categoryBar-list"><li class="categoryBar-list-item" style="background:url(./img/config_img/image-20231112202739060-2023-11-1220-27-56.png);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/AI大模型/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">AI大模型</a><span class="categoryBar-list-count">3</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/202310300007012-2023-11-1123-30-55.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/微信小程序/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">微信小程序</a><span class="categoryBar-list-count">2</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/Girl-2023-11-2221_46_26.png);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/爬虫/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">爬虫</a><span class="categoryBar-list-count">1</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/202310300007316-2023-11-1123-30-57.png);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/深度学习/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">深度学习</a><span class="categoryBar-list-count">4</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/Cat-2023-11-2221-47-16.png);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/大数据/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">大数据</a><span class="categoryBar-list-count">1</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/preview-2024-1-8-17-36-46.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/PyTorch/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">PyTorch</a><span class="categoryBar-list-count">3</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/preview-2024-1-8-17-36-11.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/多模态推荐系统/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">多模态推荐系统</a><span class="categoryBar-list-count">1</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/Starry-Night-in-Anime-Wallpaper-2023-11-2221-46-39.png);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/学习总结/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">学习总结</a><span class="categoryBar-list-count">2</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/page_img/wallhaven-y8lqo7.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/竞赛/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">竞赛</a><span class="categoryBar-list-count">2</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/preview-2024-1-8-17-34-25.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/Python/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">Python</a><span class="categoryBar-list-count">4</span><span class="categoryBar-list-descr"></span></li><li class="categoryBar-list-item" style="background:url(./img/config_img/preview-2024-1-8-17-37-57.jpg);"> <a class="categoryBar-list-link" onclick="pjax.loadUrl(&quot;categories/Liunx/&quot;);" href="javascript:void(0);" rel="external nofollow noreferrer">Liunx</a><span class="categoryBar-list-count">2</span><span class="categoryBar-list-descr"></span></li></ul></div></div>';
      console.log('已挂载butterfly_categories_card')
      parent_div_git.insertAdjacentHTML("afterbegin",item_html)
      }
    if( document.getElementById('recent-posts') && (location.pathname ==='/'|| '/' ==='all')){
    butterfly_categories_card_injector_config()
    }
  </script><script data-pjax>
  function butterfly_footer_beautify_injector_config(){
    var parent_div_git = document.getElementById('footer-wrap');
    var item_html = '<div id="workboard"></div><p id="ghbdages"><a class="github-badge" target="_blank" href="https://hexo.io/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="博客框架为Hexo_v6.2.0" title=""><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&amp;logo=hexo" alt=""/></a><a class="github-badge" target="_blank" href="https://butterfly.js.org/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="主题版本Butterfly_v4.3.1" title=""><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&amp;logo=bitdefender" alt=""/></a><a class="github-badge" target="_blank" href="https://github.com/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站采用多线部署，主线路托管于Github Pages" title=""><img src="https://img.shields.io/badge/Hosted-Github Pages-brightgreen?style=flat&amp;logo=Github" alt=""/></a><a class="github-badge" target="_blank" href="https://gitee.com/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站采用多线部署，备用线路托管于Gitee Pages" title=""><img src="https://img.shields.io/badge/Hosted-Gitee Pages-22DDDD?style=flat&amp;logo=Gitee" alt=""/></a><a class="github-badge" target="_blank" href="https://github.com/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站项目由Github托管" title=""><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&amp;logo=GitHub" alt=""/></a><a class="github-badge" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可" title=""><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&amp;logo=Claris" alt=""/></a></p>';
    console.log('已挂载butterfly_footer_beautify')
    parent_div_git.insertAdjacentHTML("beforeend",item_html)
    }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_footer_beautify_injector_config();
  }
  else if (epage === cpage){
    butterfly_footer_beautify_injector_config();
  }
  </script><script async src="/./js/runtime.js"></script><!-- hexo injector body_end end --></body></html>